layui.config({
    base : "/layui/"
}).extend({
    index: 'lib/index'
}).use(['index','form','jquery', 'table'],function(){
    var  form = layui.form;
    form.verify({
        TwoDecimal: function (value) {
            if (!/^\d+(\.\d{1,2})?$/.test(value)) {
                return '最多输入两位小数';
            }
        }
    });


    form.on("submit(oemInfo)",function(data){

        $.post("/withdrawOem/edit",data.field,function (result) {
            if(result.code==1){
                layer.msg(result.message);
            }else {
                layer.msg(result.message);
            }
        });

        return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
    });


});